<template>
	<div class="content_show_box">
		<div class="hand">
			<h2>{{ title }}</h2>
			<div class="tab"><slot name="tab"></slot></div>
			<template v-if="$attrs.to">
				<router-link :to="$attrs.to">
					更多
					<i class="el-icon-arrow-right"></i>
				</router-link>
			</template>
		</div>
		<slot></slot>
	</div>
</template>

<script>
export default {
	props: ['title']
};
</script>

<style lang="scss" scoped>
.content_show_box {
	border: solid 1px #e5e5e5;
	margin-bottom: 40px;
	.hand {
		display: flex;
		align-items: center;
		height: 48px;
		h2 {
			height: 46px;
			line-height: 43px;
			font-size: 20px;
			flex-shrink: 0;
			padding: 0 10px;
			color: #357c65;
			border-top: solid 3px #357c65;
			margin: -1px 0 0 -1px;
		}
		.tab {
			flex: 1;
			margin-left: 20px;
			overflow: hidden;
			span {
				font-size: 16px;
			}
		}
		a {
			display: flex;
			align-items: center;
			text-decoration: none;
			color: #666;
			flex-shrink: 0;
			margin: 0 10px;
			&:hover {
				color: #357c65;
			}
		}
	}
}
</style>
